package com.smforj.ssm.mina.message;

/***
 * 消息体
 * @author ghj
 *
 */
public class MessageBody { 
	//身份证信息
	private String name;
	private String sex;
	private String nation;  // 长度变化
	private String birthday;
	private String idenNum;
	private String address;
	private String statday;
	private String endday;
	private String department;
	private String reserved;
	
	//身份证图片
	private int idImgLength;
	private byte[] idImg;
	
	//采集的指纹图片
	private int fpImgLength;
	private byte[] fpImg;
	
	//USB采集图片（JPG）
	private int capImgLength;
	private byte[] capImg;
	
	//USB剪裁的采集图片（JPG）
	private int cropImgLength;
	private byte[] cropImg; 
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	public String getIdenNum() {
		return idenNum;
	}
	public void setIdenNum(String idenNum) {
		this.idenNum = idenNum;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getStatday() {
		return statday;
	}
	public void setStatday(String statday) {
		this.statday = statday;
	}
	public String getEndday() {
		return endday;
	}
	public void setEndday(String endday) {
		this.endday = endday;
	}
	public String getDepartment() {
		return department;
	}
	public void setDepartment(String department) {
		this.department = department;
	}
	public String getReserved() {
		return reserved;
	}
	public void setReserved(String reserved) {
		this.reserved = reserved;
	}
	public byte[] getIdImg() {
		return idImg;
	}
	public void setIdImg(byte[] idImg) {
		this.idImg = idImg;
	}
	public byte[] getFpImg() {
		return fpImg;
	}
	public void setFpImg(byte[] fpImg) {
		this.fpImg = fpImg;
	}
	public byte[] getCapImg() {
		return capImg;
	}
	public void setCapImg(byte[] capImg) {
		this.capImg = capImg;
	}
	public byte[] getCropImg() {
		return cropImg;
	}
	public void setCropImg(byte[] cropImg) {
		this.cropImg = cropImg;
	}
	public int getIdImgLength() {
		return idImgLength;
	}
	public void setIdImgLength(int idImgLength) {
		this.idImgLength = idImgLength;
	}
	public int getFpImgLength() {
		return fpImgLength;
	}
	public void setFpImgLength(int fpImgLength) {
		this.fpImgLength = fpImgLength;
	}
	public int getCapImgLength() {
		return capImgLength;
	}
	public void setCapImgLength(int capImgLength) {
		this.capImgLength = capImgLength;
	}
	public int getCropImgLength() {
		return cropImgLength;
	}
	public void setCropImgLength(int cropImgLength) {
		this.cropImgLength = cropImgLength;
	} 
	
	/***
	 * 获取byte[] 数组
	 * @return
	 */
	public byte[] getBytes()
	{
		return MessageModel.ObjectToByte(this); 
	}
	
	public int getBodyLength()
	{
		return 302+16+this.idImgLength+this.fpImgLength+this.capImgLength+this.capImgLength;
	}
	
	public void print() {
		System.out.println("-------MessageBody Print Start----------");
		System.out.println("身份证信息-名称：" + name);
		System.out.println("身份证信息-性别：" + sex);
		System.out.println("身份证信息-民族：" + nation);  // 长度变化
		System.out.println("身份证信息-生日：" + birthday);
		System.out.println("身份证信息-身份证：" + idenNum);
		System.out.println("身份证信息-地址：" + address);
		System.out.println("身份证信息-开始日期：" + statday);
		System.out.println("身份证信息-结束日期：" + endday);
		System.out.println("身份证信息-发证机关：" + department);
		System.out.println("身份证信息：" + reserved);
		
		System.out.println("身份证图片" + idImgLength);
		System.out.println("采集的指纹图片" + fpImgLength);
		System.out.println("USB采集图片（JPG）" + capImgLength);
		System.out.println("USB剪裁的采集图片（JPG）" + cropImgLength);
		System.out.println("-------MessageBody Print End----------");
	}
}
